package po.emp;
/**
 * 部门类
 * @author admin
 *
 */
public class Department {
	private int departId;
	private String departName;
	private boolean deleteFlag;  //删除标记，false没被删除
	public Department() {
		super();
	}
	public Department(int departId, String departName, boolean deleteFlag) {
		super();
		this.departId = departId;
		this.departName = departName;
		this.deleteFlag = deleteFlag;
	}
	public int getDepartId() {
		return departId;
	}
	public void setDepartId(int departId) {
		this.departId = departId;
	}
	public String getDepartName() {
		return departName;
	}
	public void setDepartName(String departName) {
		this.departName = departName;
	}
	public boolean isDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	@Override
	public String toString() {
		return "Department [departId=" + departId + ", departName=" + departName + ", deleteFlag=" + deleteFlag + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (deleteFlag ? 1231 : 1237);
		result = prime * result + departId;
		result = prime * result + ((departName == null) ? 0 : departName.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Department other = (Department) obj;
		if (deleteFlag != other.deleteFlag)
			return false;
		if (departId != other.departId)
			return false;
		if (departName == null) {
			if (other.departName != null)
				return false;
		} else if (!departName.equals(other.departName))
			return false;
		return true;
	}
	
}
